<%-- 
    Document   : AllSach
    Created on : Jun 1, 2013, 6:12:01 PM
    Author     : quannq
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<div id="comment-box">
    <input style="margin-bottom: -3px;" type="button"
           class="button-primary" value="Thêm Sách"
           onclick="modalFormAdd('addsach');"/>
</div>
<br>
<table cellpadding="0" cellspacing="0" border="1" class="display example"
       style="color: black; width: 1000px;">
    <thead align="center">
        <tr>
            <th>ID</th>
            <th>Ảnh Bìa</th>
            <th>Tên Sách</th>
            <th>Tác Giả</th>
            <th>Thể Loại</th>
            <th>Cân Nặng</th>
            <th>Giá Bìa</th>
            <th>Năm</th>
            <th></th>
        </tr>
    </thead>
    <tbody align="center">
        <c:if test="${fn:length(Sach) == 0}">
            <tr class="gradeX">
                <td>No data</td>
            </tr>
        </c:if>

        <c:if test="${fn:length(Sach) > 0}">
            <c:forEach items="${Sach}" var="sach">

                <tr class="gradeX">
                    <td>${sach.masach}</td>
                    <td><img width=60 height=80 src="${pageContext.request.contextPath}/image/sell/${sach.anhbia}" /></td>
                    <td><a href="javascript:modalFormUpdate('infosach',${sach.masach});">${sach.tensach}</a></td>
                    <td>${sach.tacgia.tentacgia}</td>
                    <td>${sach.theloai1.tentl1}</td>
                    <td>${sach.cannang}</td>
                    <td>${sach.giabia}</td>
                    <td>${sach.namxb}</td>
                    <td><img src="${pageContext.request.contextPath}/image/admin/print.png" /></td>

                </tr>

            </c:forEach>
        </c:if>
    </tbody>
</table>